import request from "@/utils/request"

/**
 * 发起支付宝支付
 * @param orderId 订单ID
 * @returns 支付表单
 */
export const alipayAPI = (orderId) => {
  return request({
    url: '/alipay/pay',
    method: 'get',
    params: { id: orderId }
  })
}

/**
 * 支付成功后获取支付结果
 * @returns 支付结果
 */
export const getPayResultAPI = () => {
  return request({
    url: '/alipay/return',
    method: 'get'
  })
}